home *** CD-ROM | disk | FTP | other *** search
Java Source | 1996-09-11 | 571 b | 27 lines | [TEXT/R*ch] |
- import java.awt.*;
-
- public class layoutWithPanel extends java.applet.Applet
- {
- public layoutWithPanel()
- {
- setLayout( new BorderLayout() );
-
- Panel top = new Panel();
- Panel bottom = new Panel();
-
- top.setLayout( new FlowLayout() );
-
- top.add( new Label( "Enter your name:" ) );
- top.add( new TextField( "<Your name here>", 30 ) );
-
- bottom.setLayout( new FlowLayout() );
-
- bottom.add( new Button( "Eeny" ) );
- bottom.add( new Button( "Meeny" ) );
- bottom.add( new Button( "Miney-Moe" ) );
-
- add( "Center", top );
- add( "South", bottom );
- }
- }
-